home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / FWNotifn / FWNotifr.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.7 KB  |  94 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWNotifr.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWNOTIFR_H
  11. #define FWNOTIFR_H
  12.  
  13. #ifndef FWRUNTYP_H
  14. #include "FWRunTyp.h"
  15. #endif
  16.  
  17. #ifndef FWINTERE_H
  18. #include "FWIntere.h"
  19. #endif
  20.  
  21. #ifndef FWEXCLIB_H
  22. #include "FWExcLib.h"
  23. #endif
  24.  
  25. //========================================================================================
  26. // Forward declarations
  27. //========================================================================================
  28.  
  29. class FW_MReceiver;
  30. class FW_CNotification;
  31.  
  32. //========================================================================================
  33. // Type declarations
  34. //========================================================================================
  35.  
  36. //========================================================================================
  37. // CLASS FW_MNotifier
  38. //========================================================================================
  39.  
  40. class FW_MNotifier
  41. {
  42. public:
  43.     FW_DECLARE_CLASS
  44.     FW_DECLARE_AUTO(FW_MNotifier)
  45.     
  46. //----------------------------------------------------------------------------------------
  47. //    Constructors/Destructor
  48. //
  49. public:
  50.     virtual ~FW_MNotifier();
  51.  
  52. protected:
  53.     FW_MNotifier();
  54.     
  55. //----------------------------------------------------------------------------------------
  56. //    API
  57. //    
  58. public:
  59.     virtual void        Notify(Environment* ev, const FW_CNotification ¬ification);
  60.     virtual void        Notify(Environment* ev, FW_Message message);
  61.     
  62.     FW_Boolean            IsConnectedTo(FW_MReceiver* receiver, const FW_CInterest& interest);
  63.  
  64. //----------------------------------------------------------------------------------------
  65. //    Internal API
  66. //    
  67.     FW_ObjectID            PrivGetNotifierID() const;
  68.     void                PrivSetNotifierID(FW_ObjectID newID);
  69.     
  70. //----------------------------------------------------------------------------------------
  71. //    Data Members
  72. //
  73. private:
  74.     FW_ObjectID    fNotifierID;
  75. };
  76.  
  77. //----------------------------------------------------------------------------------------
  78. // FW_MNotifer::PrivGetNotifierID
  79. //----------------------------------------------------------------------------------------
  80. inline FW_ObjectID FW_MNotifier::PrivGetNotifierID() const
  81. {
  82.     return fNotifierID;
  83. }
  84.  
  85. //----------------------------------------------------------------------------------------
  86. // FW_MNotifer::PrivSetNotifierID
  87. //----------------------------------------------------------------------------------------
  88. inline void FW_MNotifier::PrivSetNotifierID(FW_ObjectID newID)
  89. {
  90.     fNotifierID = newID;
  91. }
  92.  
  93. #endif
  94.